using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TopographicProductionTools._DataManagement._Features
{
    /// <summary>
    /// <para>Calculate Metrics</para>
    /// <para>Populates metrics for features in a geodatabase. Metrics include length, width, area, and elevation attributes.</para>
    /// <para>填充地理数据库中要素的衡量指标。指标包括长度、宽度、面积和海拔属性。</para>
    /// </summary>    
    [DisplayName("Calculate Metrics")]
    public class CalculateMetrics : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CalculateMetrics()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The features on which metrics will be calculated.</para>
        /// <para>将计算指标的特征。</para>
        /// </param>
        /// <param name="_in_metric_types">
        /// <para>Input Metric Types</para>
        /// <para><xdoc>
        ///   <para>Specifies the types of metrics to calculate, including angle of orientation, area, elevation, length, and width.</para>
        ///   <bulletList>
        ///     <bullet_item>Angle of orientation—Calculate angle of orientation metrics</bullet_item><para/>
        ///     <bullet_item>Area—Calculate area metrics</bullet_item><para/>
        ///     <bullet_item>Elevation—Calculate elevation metrics</bullet_item><para/>
        ///     <bullet_item>Length—Calculate length metrics</bullet_item><para/>
        ///     <bullet_item>Width—Calculate width metrics</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要计算的度量类型，包括方向角、面积、高程、长度和宽度。</para>
        ///   <bulletList>
        ///     <bullet_item>方向角 - 计算方向角度指标</bullet_item><para/>
        ///     <bullet_item>面积 - 计算面积度量</bullet_item><para/>
        ///     <bullet_item>高程 - 计算高程指标</bullet_item><para/>
        ///     <bullet_item>长度 - 计算长度度量</bullet_item><para/>
        ///     <bullet_item>宽度 - 计算宽度指标</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public CalculateMetrics(List<object> _in_features, List<object> _in_metric_types)
        {
            this._in_features = _in_features;
            this._in_metric_types = _in_metric_types;
        }
        public override string ToolboxName => "Topographic Production Tools";

        public override string ToolName => "Calculate Metrics";

        public override string CallName => "topographic.CalculateMetrics";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_features, _in_metric_types, _in_length_attributes, _in_width_attributes, _in_area_attributes, _in_angle_attributes, _in_elevation_attributes, _in_precision, _out_features];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The features on which metrics will be calculated.</para>
        /// <para>将计算指标的特征。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_features { get; set; }


        /// <summary>
        /// <para>Input Metric Types</para>
        /// <para><xdoc>
        ///   <para>Specifies the types of metrics to calculate, including angle of orientation, area, elevation, length, and width.</para>
        ///   <bulletList>
        ///     <bullet_item>Angle of orientation—Calculate angle of orientation metrics</bullet_item><para/>
        ///     <bullet_item>Area—Calculate area metrics</bullet_item><para/>
        ///     <bullet_item>Elevation—Calculate elevation metrics</bullet_item><para/>
        ///     <bullet_item>Length—Calculate length metrics</bullet_item><para/>
        ///     <bullet_item>Width—Calculate width metrics</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要计算的度量类型，包括方向角、面积、高程、长度和宽度。</para>
        ///   <bulletList>
        ///     <bullet_item>方向角 - 计算方向角度指标</bullet_item><para/>
        ///     <bullet_item>面积 - 计算面积度量</bullet_item><para/>
        ///     <bullet_item>高程 - 计算高程指标</bullet_item><para/>
        ///     <bullet_item>长度 - 计算长度度量</bullet_item><para/>
        ///     <bullet_item>宽度 - 计算宽度指标</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Metric Types")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_metric_types { get; set; }


        /// <summary>
        /// <para>Input Length Attributes</para>
        /// <para>A comma-delimited string of field names from which the length metrics will be calculated. The default is LEG,LEN,LEN_,LGN,LZN. You can add the names of other length metric fields; if the fields exist in Input Features, they will be computed.</para>
        /// <para>以逗号分隔的字段名称字符串，从中计算长度指标。默认值为 LEG、LEN、LEN_、LGN、LZN。您可以添加其他长度度量字段的名称;如果输入要素中存在字段，则将对其进行计算。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Length Attributes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_length_attributes { get; set; } = null;


        /// <summary>
        /// <para>Input Width Attributes</para>
        /// <para>A comma-delimited string of field names from which the width metrics will be calculated. The default is WID,WID_,WGP. You can add the names of other width metric fields; if the fields exist in Input Features, they will be computed.</para>
        /// <para>以逗号分隔的字段名称字符串，将从中计算宽度指标。默认值为 WID，WID_，WGP。您可以添加其他宽度度量字段的名称;如果输入要素中存在字段，则将对其进行计算。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Width Attributes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_width_attributes { get; set; } = null;


        /// <summary>
        /// <para>Input Area Attributes</para>
        /// <para>A comma-delimited string of field names from which the area metrics will be calculated. The default is ARA,ARE,ARE_. You can add the names of other area metric fields; if the fields exist in Input Features, they will be computed.</para>
        /// <para>以逗号分隔的字段名称字符串，将从中计算面积指标。默认值为 ARA、ARE、ARE_。您可以添加其他面积度量字段的名称;如果输入要素中存在字段，则将对其进行计算。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Area Attributes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_area_attributes { get; set; } = null;


        /// <summary>
        /// <para>Input Angle of Orientation Attributes</para>
        /// <para>A comma-delimited string of field names from which the angle of orientation metrics will be calculated. The default is AOO,DOF,FEO. You can add the names of other angle of orientation metric fields; if the fields exist in Input Features, they will be computed.</para>
        /// <para>以逗号分隔的字段名称字符串，从中计算方向度量的角度。默认值为 AOO，DOF，FEO。您可以添加其他方向角度度量字段的名称;如果输入要素中存在字段，则将对其进行计算。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Angle of Orientation Attributes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_angle_attributes { get; set; } = null;


        /// <summary>
        /// <para>Input Elevation Attributes</para>
        /// <para>A comma-delimited string of field names from which the elevation metrics will be calculated. The default is ZV2,ZVH. You can add the names of other elevation metric fields; if the fields exist in Input Features, they will be computed.</para>
        /// <para>以逗号分隔的字段名称字符串，从中计算高程指标。默认值为 ZV2，ZVH。您可以添加其他高程度量字段的名称;如果输入要素中存在字段，则将对其进行计算。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Elevation Attributes")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_elevation_attributes { get; set; } = null;


        /// <summary>
        /// <para>Input Floating Point Precision</para>
        /// <para>The precision of the metrics written to the target attributes.</para>
        /// <para>写入目标属性的指标的精度。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Floating Point Precision")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _in_precision { get; set; } = 0;


        /// <summary>
        /// <para>Output Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public List<object> _out_features { get; set; }


        public CalculateMetrics SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}